API Resources Summary
The Velolink API provides access to various transit and vehicle data resources through a GraphQL endpoint at https://api.velolink.cloud/graphql. Below is a comprehensive overview of the available resources and their capabilities. For detailed API information, please refer to the GraphQL API Reference section.
Transit Data Configuration
GTFS Configuration
- Query Configuration:
gtfsConfig(namespace)- View current GTFS configuration settings
- Update Configuration:
setGtfs(namespace, gtfs, gtfsrt, agency, timezone, headers)- Configure GTFS static data endpoint (updated weekly)
- Set up GTFS-RT real-time data endpoint
- Specify agency and timezone settings
- Add custom headers for authentication with services like Swiftly
Key Locations
Marker Management
- Single Key Location:
marker(namespace, id)- Retrieve specific key location details
- Multiple Key Locations:
markers(namespace, page, per_page)- List all key locations with pagination
- Create Key Location:
createMarker(namespace, name, description, lat, long, radius)- Define new key locations
- Update Key Location:
updateMarker(id, namespace, name, description, lat, long, radius)- Modify existing key locations
- Delete Key Location:
deleteMarker(namespace, id)- Remove key locations
Transit Information
Static GTFS Data
-
Route Queries:
- Single Route:
route(namespace, id) - Multiple Routes:
routes(namespace, page, per_page)
- Single Route:
-
Trip Queries:
- Single Trip:
trip(namespace, id) - Route Trips:
trips(namespace, routeId)
- Single Trip:
note
Static GTFS data is automatically updated weekly
Usage Data
Real-time Usage Data
-
Current Status:
latest(namespace, vehicleId)- Real-time vehicle positions and feature status
- Optional filtering by specific vehicle
note
For data response format, please see Real-Time Data Feed
Historical Data
- Position History:
historical(namespace, ...filters)- Filter by route, trip, time range, and location
- Includes radius-based geographic filtering
- Supports pagination
- Access feature usage history
Event Tracking
- Usage Events:
events(namespace, ...filters)- Filter by event type, route, trip, vehicle
- Specify time range
- Paginated results
Journey Analysis
- Usage Journeys:
journeys(namespace, ...filters)- Track movements between key locations
- Filter by marker name
- Geographic filtering with start/end points
- Time range specification
- Journey type filtering
- Paginated results
Auto Vehicle Association
- Learning Status:
- All Devices:
learningStates(namespace) - Single Device:
learningState(namespace, deviceId)
- All Devices:
Common Parameters
namespace: Organization identifier (required for all queries)pageandper_page: Pagination controls- Time filters:
createdAfter: Start timestampcreatedBefore: End timestamp
- Geographic filters:
lat,long: Coordinatesradius: Search radius in meters
Data Access Methods
- GraphQL API: All queries and mutations above
- WebSocket: Real-time data feed for live vehicle updates - see Live Data Feed
Best Practices
tip
- Use appropriate permissions for your specific needs
- Implement pagination for large data sets
- Use WebSocket connection for real-time updates
- Cache static data where appropriate
- Monitor API token expiration
note
For detailed information about permissions and specific API calls, please refer to the Permissions documentation.